package com.example.mapper;

import com.example.entity.SupplyCategory;
import com.example.vo.SupplyCategoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SupplyCategoryMapper {
    
    /**
     * 插入供货分类
     */
    int insert(SupplyCategory supplyCategory);
    
    /**
     * 根据ID删除
     */
    int deleteById(Long id);
    
    /**
     * 根据ID更新
     */
    int updateById(SupplyCategory supplyCategory);
    
    /**
     * 根据ID查询
     */
    SupplyCategory selectById(Long id);
    
    /**
     * 根据ID查询VO
     */
    SupplyCategoryVO selectVOById(Long id);
    
    /**
     * 条件查询列表
     */
    List<SupplyCategory> selectList(@Param("supplyCategory") SupplyCategory supplyCategory);
    
    /**
     * 条件查询VO列表
     */
    List<SupplyCategoryVO> selectVOList(@Param("supplyCategory") SupplyCategory supplyCategory);
    
    /**
     * 查询所有启用的分类
     */
    List<SupplyCategoryVO> selectAllEnabled();
    
    /**
     * 根据分类编码查询
     */
    SupplyCategory selectByCategoryCode(String categoryCode);
} 